package com.shop.controller;

import com.shop.mapper.UserMapper;
import com.shop.pojo.User;
import com.shop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @date 2021/12/22 - 10:37
 */
@Controller
public class TestConrller {

    @Autowired
    private UserService userService;

    @RequestMapping("/test")
    @ResponseBody
    public List<User> test(){

        return this.userService.findAllUser();
    }


}
